package com.itaming.lycheeframework.security.authorization;

import java.lang.annotation.*;

/**
 * 权限验证注解
 *
 * @author A.Ming
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface Permission {

    /**
     * 权限值列表
     */
    String[] value();

    /**
     * 匹配类型
     *
     * @return
     */
    MatchType type() default MatchType.AND;

    /**
     * 匹配类型枚举
     */
    enum MatchType {
        AND,
        OR
    }

}
